/**
* AutoSWF - Cody Cushing. March 26, 2009
* Copyright (c) 2009 Cody Cushing
* No use restrictions. Maintain this notice in all versions. 
**/

package com.autoswf.core
{
	import flash.events.Event;
	import flash.utils.Dictionary;

	public class MockChainLink implements IChainLink
	{
		private var _id:String
		private var _addParentLinkResult:IChainLink;
		private var _addChildLinkResult:IChainLink;
		private var _sendUpChainResult:String;
		private var _sendDownChainResult:*;
		
		public function MockChainLink(id:String)
		{
			_id = id;
		}

		public function get id():String
		{
			return _id;
		}
		
		public function set id(value:String):void
		{
			_id = value;
		}
		
		public function addParentLink(parentChainLink:IChainLink):void
		{
			_addParentLinkResult = parentChainLink;
		}
		public function removeParentLink(parentChainLink:IChainLink):void
		{
			
		}
				
		public function addChildLink(childChainLink:IChainLink):void
		{
			_addChildLinkResult = childChainLink;
		}

		public function removeChildLink(childChainLink:IChainLink):void
		{
			
		}
		
		public function sendUpChain(param:*):void
		{
			_sendUpChainResult = param;
		}
		
		public function sendDownChain(path:*):String
		{
			if(Transport(path).message is Event)
			{
				_sendDownChainResult =  Transport(path).message.type;
			}
			else _sendDownChainResult = path;
			return null;
		}
		
		public function explore(map:Dictionary, sequence:String, path:String):void
		{
			
		}
		
		
		/* inspection methods */
		
		public function get addParentLinkResult():IChainLink
		{
			return _addParentLinkResult;
		}
		
		public function get addChildLinkResult():IChainLink
		{
			return _addChildLinkResult;
		}
		
		public function get sendUpChainResult():String
		{
			return _sendUpChainResult;
		}
		
		public function get sendDownChainResult():String
		{
			return _sendDownChainResult;
		}
		
	}
}